package com.euond.accv.mdm.api.controller;

import com.euond.accv.mdm.client.dto.BasDictDTO;
import com.euond.accv.mdm.service.BasDictService;
import com.euond.common.web.controller.annotation.FeignRestController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignRestController
@RequestMapping("/feign_api/bas_dict")
@Api(description = "码表Api")
public class BasDictApiController {
	@Autowired
	BasDictService service;

	@ApiOperation(value = "根据编码获取码表数据", httpMethod="GET")
	@GetMapping("/getDtlByDictCode")
	public List<BasDictDTO> getDtlByDictCode(@RequestParam("dictCode") String dictCode){
		List<BasDictDTO> dtoList = service.getDtlByDictCode(dictCode);

		return dtoList;
	}

}
